$(document)
		.ready(
				function() {
					// 供应商下拉框的数据绑定
					var purchaseOrderVue = new Vue({
						el : '#purchaseOrderDiv',
						data : {
							items : null
						},
						methods : {
							show : function(purchaseOrder) {
								openShowPurchaserOrderBox(purchaseOrder);
							}
						},
						beforeCreate : function() {
							var _self = this;
							$.get(SERVER_PRE_URL
									+ "purchaseOrder/getAllPurchaseOrderAjax",
									function(data) {
										_self.items = data;
									});
						}
					});

					//打开查看采购申请窗口
					function openShowPurchaserOrderBox(purchaseOrder) {
						var url = 'purchaseOrder/getPurchaseOrderByPrimaryKeyReturnTo?purchaseOrderId='
								+ purchaseOrder.purchaseOrderId
								+ '&remark='
								+ 'show'
								+ '&returnTo=showPurchaseOrder';
						layer.open({
							type : 2,
							maxmin : true,
							title : '查看采购申请',
							offset : '4%',
							btnAlign : 'c',
							area : [ '70%', '92%' ],
							shadeClose : true, // 点击遮罩关闭
							content : SERVER_PRE_URL + url
						});

					}

				});